﻿using MTUnity.Utils;
using Script.UI;
using Script.UI.Component;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class UI_Histogram_Temperature : UI_Histogram<HistogramData_Temperature>
{

    public HistogramDisplay Histogram_DisplayInterface;
    public Text Txt_Temperature;
    public Text Txt_Time;
    // Start is called before the first frame update
    void Start()
    {

    }

    // Update is called once per frame
    void Update()
    {

    }


    protected override void OnRefresh()
    {
        DateTime dt = TimeUtil.FromTimestamp(Data.Timestamp);
        
        Txt_Time.text = dt.Hour.ToString(); 
        Txt_Temperature.text = ((int)Data.Current).ToString();

        Histogram_DisplayInterface.SpecificMaxValue = (float)Data.Max;
        Histogram_DisplayInterface.SpecificMinValue = (float)Data.Min;
        Histogram_DisplayInterface.CurrentValue = (float)Data.Current;
    }
}
